package com.gitee.wsl.common.ui.input.event

/**
 * Allow the access to the ALT, CTRL, META, SHIFT key during an event
 */
 interface HasMetaKeys{
     val altKey: Boolean
     val ctrlKey: Boolean
     val shiftKey: Boolean
     val metaKey: Boolean

    /**
     * No "meta key" is pressed (not CTRL, SHIFT, ALT or META)
     */
     fun noKey(): Boolean
}

internal data class HasMetaKeysImpl(
     override val altKey: Boolean = false,
     override val ctrlKey: Boolean = false,
     override val shiftKey: Boolean = false,
     override val metaKey: Boolean = false
) : HasMetaKeys {
     override fun noKey(): Boolean = (!altKey && !ctrlKey && !shiftKey && !metaKey)
}